CompTIA XK0-004 CompTIA Linux+ Certification Exam Efficiently Pass XK0-004 Exam With CompTIA XK0-004 Exam Dumps [2022] 1. Two specific users need access to a directory owned by root where backups are located. Which of the following commands would BEST ensure the specified users can access the backup files? A. umask B. chcon C. chmod D. setfacl Answer: D 2.An operator finds a user is having issues with opening certain files. Which of the following commands would allow the security administrator to list and check the SELinux context? A. ls CD B. ls Ca C. ls CZ D. ls -1 Answer: C Explanation: Reference: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/ 6/html/security-enhanced_linux/sect-security-enhanced_linux-working_with_selinux- selinux_contexts_labeling_files 3.A junior Linux administrator is updating local name resolution to support IPv6. The administrator issues the command cat /etc/hosts and receives the following output: 4.A networked has been crashing intermittently. A Linux administrator would like to write a shell script that will attempt to ping the server and email an alert if the server fails to respond. The script will later be scheduled via cron job. Which of the following scripts would BEST accomplish this task? Efficiently Pass XK0-004 Exam With CompTIA XK0-004 Exam Dumps [2022] A. Option A B. Option B C. Option C D. Option D Answer: D Efficiently Pass XK0-004 Exam With CompTIA XK0-004 Exam Dumps [2022] 5.A systems administrator needs to retrieve specific fields from a csv file. Which of the following tools would accomplish this task? A. awk B. sort C. print D. echo Answer: A Explanation: Reference: https://stackoverflow.com/questions/19602181/how-to-extract-one-column- of-a-csv-file 6.A junior administrator is migrating a virtual machine from a Type 1 hypervisor to a Type 2 hypervisor. To ensure portability, which of the following formats should the administrator export from the Type 1 hypervisor to ensure compatibility? A. OWASP B. VDI C. VMDK D. OVA Answer: D Explanation: Reference: https://docs.vmware.com/en/VMware-Fusion/11/com.vmware.fusion.using .doc/GUID-16E390B1-829D-4289-8442-270A474C106A.html 7.Which of the following is the purpose of the vmlinux file on a Linux system? A. To prevent a Linux kernel panic B. To start a Linux virtual machine C. To provide the executable kernel for the system D. To enable resource access to the network Answer: C Explanation: Reference: https://en.wikipedia.org/wiki/Vmlinux 8.A server is almost out of free memory and is becoming unresponsive. Which of the following sets of commands will BEST mitigate the issue? A. free, fack, partprobe B. lsof, lvcreate, mdadm C. df, du, rmmod D. fdisk, mkswap, swapon -a Answer: A Efficiently Pass XK0-004 Exam With CompTIA XK0-004 Exam Dumps [2022] Explanation: Reference: https://vitux.com/7-commands-to-check-swap-space-in-debian-10/ 9.An administrator needs to see a list of the system user’s encrypted passwords. Which of the following Linux files does the administrator need to read? A. /etc/shadow B. /etc/skel C. /etc/passwd D. /etc/pw Answer: C Explanation: Reference: https://www.cyberciti.biz/faq/where-are-the-passwords-of-the-users- located-in-linux/ 10.A Linux administrator is testing connectivity to a remote host on a shared terminal. The administrator wants to allow other users to access the terminal while the command is executing. Which of the following commands should the administrator use? A. bg ping remotehost B. fg ping remotehost C. ping remotehost < results D. ping remotehost & Answer: C 11.Which of the following is the template for the grub.cfg file? A. /etc/default/grub B. /etc/grub2.cfg C. /etc/sysct1.conf D. /boot/efi Answer: A Explanation: Reference: https://geek-university.com/linux/grub-version-2/ 12.A systems administration team has decided to their systems as immutable instances. They keep the desired state of each of their systems in version control and apply automation whenever they provision a new instance. If there is an issue with one of their servers, instead of troubleshooting the issue they terminate the instance and rebuild it using automation. Which of the following is this an example of? Efficiently Pass XK0-004 Exam With CompTIA XK0-004 Exam Dumps [2022] A. Inventory B. Orchestration C. Infrastructure as code D. Agentless deployment Answer: C 13.Ann, a junior systems administrator, is required to add a line to the /etc/yum.conf file. However, she receives the following error message when she tries to add the line: Ann performs some diagnostics to attempt to find the root cause: Which of the following commands should Ann execute to write content to /etc/yum? A. chmod 755 /etc/yum.conf B. setfacl Cm m:rw /etc/yum.conf C. chattr CI /etc/yum.conf D. setenforce 0 Answer: C Explanation: https://www.linuxtoday.com/upload/5-chattr-commands-to-make-important-files- immutable-unchangeable-in-linux-141004025008.html Efficiently Pass XK0-004 Exam With CompTIA XK0-004 Exam Dumps [2022] 14.A user attempts to use the mount -a command but gets the following error: mount: mount point /mnt/test does not exist Which of the following commands best describes the action the Linux administrator should take NEXT? A. mount Ca /mnt/test B. mkdir Cp /mnt/test C. mdadm Cp /mnt/test D. mkfs /mnt/test E. touch /mnt/test Answer: B Explanation: Reference: https://serverfault.com/questions/751113/mount-point-does-not-exist- despite-creating-it 15.A Linux administrator implemented a new HTTP server using the default configuration. None of the users on the network can access the server. If there is no problem on the network or with the users’ workstations, which of the following steps will BEST analyze and resolve the issue? A. Run netstat to ensure the port is correctly bound, and configure the firewall to allow access on ports 80 and 443 B. Run route to ensure the port is correctly bound, and configure the firewall to allow access on ports 80 and 443 C. Run netcat to ensure the port is correctly bound, and configure a static route to the web to allow access on ports 80 and 443 D. Run route to ensure the port is correctly bound, and configure SELinux to allow access on ports 80 and 443 Answer: C Explanation: Reference: https://www.varonis.com/blog/netcat-commands/ 16.Which of the following is a difference between YAML and JSON? A. Users can comment in YAML but not in JSON B. JSON only curly brackets, while YAML only uses square brackets C. JSON is used in web development, while YAML is used solely in back-end systems. D. YAML has been deprecated for JSON. Answer: A Explanation: Reference: https://www.json2yaml.com/yaml-vs-json Efficiently Pass XK0-004 Exam With CompTIA XK0-004 Exam Dumps [2022] 17.A junior Linux administrator is trying to verify connectivity to the remote host host1 and display round-trip statistics for ten ICMP. Which of the following commands should the administrator execute? A. ping Cc 10 host1 B. traceroute Cc 10 host1 C. netstat host1 D. pathping Cc 10 host1 Answer: A Explanation: Reference: https://shapeshed.com/unix-ping/ 18.A Linux systems administrator wants the ability to access systems remotely over SSH using RSA authentication. To which of the following files should the RSA token be added to allow this access? A. authorized_keys B. ~/.ssh/ssh_config C. id_rsa.pub D. known_hosts Answer: C Explanation: Reference: https://www.digitalocean.com/community/tutorials/how-to-configure-ssh- key-based-authentication-on-a-linux-server 19.A system administrator has set up third-party log aggregation agents across several cloud instances. The systems administrator wants to create a dashboard of failed SSH attempts and the usernames used. Which of the following files should be watched by the agents? A. /var/log/audit/audit.log B. /var/log/kern.log C. /var/log/monitor D. /etc/rsyslog.conf Answer: D 20.After starting a long-running script, a systems administrator needs to verify the frequency of what is filling up the /var partition and kill it because it is consuming too much space. Which of the following is the correct sequence given only a terminal is available? A. 1. CTRL-C2. bg3. watch df /var4. CTRL-C5. fg6. CTRL-Z Efficiently Pass XK0-004 Exam With CompTIA XK0-004 Exam Dumps [2022] B. 1. CTRL-C2. fg3. watch df /var4. CTRL-Z5. bg6. CTRL-Z C. 1. CTRL-Z2. bg3. watch df /var4. CTRL-C5. fg6. CTRL-C D. 1. CTRL-Z2. bg3. watch df /var4. CTRL-Z5. fg6. CTRL-C Answer: D 21.A Linux systems administrator needs to set permissions on an application with the following parameters: The owner of the application should be able to read, write, and execute the application. Members of the group should be able to read and execute the application. Everyone else should not have access to the application. Which of the following commands would BEST accomplish these tasks? A. chmod 710 <application name> B. chmod 730 <application name> C. chmod 750 <application name> D. chmod 760 <application name> Answer: D 22.A junior administrator needs to unload an older video kernel module. Which of the following commands would BEST accomplish this task? A. modprobe B. insmod C. rmmod D. chmod Answer: A Explanation: Reference: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Lin ux/7/html/Kernel_Administration_Guide/sec-Unloading_a_Module.html 23.A junior administrator of a physical server receives log messages indicating the out- of-memory killer has been active. All memory slots are in use on the motherboard, but additional disk space is available. Space has been allocated for a swap file. Which of the following should the administrator use to reduce the output of memory messages? A. free: swapoff / swapfile ; swapon -a B. mkswap /swapfile; swapon Ca C. fallocate Cl 2G /swapfile && swapon Ca D. echo “1” > /proc/meninfo ; swapon / swapfile Answer: A Efficiently Pass XK0-004 Exam With CompTIA XK0-004 Exam Dumps [2022] 24.A Linux administrator opens a ticket to have an external hard drive mounted. As a security policy, external storage kernel modules are disabled. Which of the following is the BEST command for adding the proper kernel module to enable external storage modules? A. rmmod /lib/modules/3.6.12-100-generic/kernel/drivers/usb/storage/usb-storage.ko B. modinfo /lib/modules/3.6.12-100-generic/kernel/drivers/usb/storage/usb-storage.ko C. depmod /lib/modules/3.6.12-100-generic/kernel/drivers/usb/storage/usb-storage.ko D. insmod /lib/modules/3.6.12-100-generic/kernel/drivers/usb/storage/usb-storage.ko Answer: D Explanation: Reference: https://www.cyberciti.biz/faq/linux-how-to-load-a-kernel-module- automatically-at-boot-time/ 25.An administrator needs to mount the shared NFS file system testhost:/testvolume to mount point /mnt/testvol and make the mount persistent after reboot. Which of the following BEST demonstrates the commands necessary to accomplish this task? A) B) C) D) Efficiently Pass XK0-004 Exam With CompTIA XK0-004 Exam Dumps [2022] A. Option A B. Option B C. Option C D. Option D Answer: A 26.Joe, a user, is unable to log in to the server and contracts the systems administrator to look into the issue. The administrator examines the /etc/passwd file and discovers the following entry: joe:x:505:505::/home/joe:/bin/false Which of the following commands should the administrator execute to resolve the problem? A. usermod Cs /bin/bash joe B. passwd Cu joe C. useradd Cs /bin/bash joe D. chage CE -1 joe Answer: B Explanation: Reference: https://doc.lagout.org/security/McGraw-Hill - Hacking Exposed%2C 3rd Ed - Hacking Exposed Win2.pdf (303) 27.While creating a file on a volume, the Linux administrator receives the following message: No space left on device. Running the df Cm command, the administrator notes there is still 50% of usage left. Which of the following is the NEXT step the administrator should take to analyze the issue without losing data? A. Run the df Ci command and notice the inode exhaustion B. Run the df Ch command and notice the space exhaustion C. Run the df CB command and notice the block size D. Run the df Ck command and notice the storage exhaustion Answer: A Explanation: Reference: https://www.tecmint.com/how-to-check-disk-space-in-linux/ Efficiently Pass XK0-004 Exam With CompTIA XK0-004 Exam Dumps [2022] 28.A Linux administrator has configured a Linux system to be used as a router. The administrator confirms that two network adapters are properly installed and functioning correctly. In addition, the output of the iptables CL command appears to contain a complete firewall configuration. Which of the following commands does the administrator need to issue for the router to be fully functional? A. echo “1” > /proc/sys/net/ipv4/ip_forward B. echo “0” > /proc/sys/net/ipv4/tcp_abort_on_overflow C. echo “0” > /proc/sys/net/ipv4/max_connections D. echo “1” > /proc/sys/net/ipv4/ip_default_ttl Answer: A 29.A systems administrator is configuring options on a newly installed Linux VM that will be deployed to the Pacific time zone. Which of the following sets of commands should the administrator execute to accurately configure the correct time settings? A. cd /etcln Cs /usr/share/zoneinfo/US/Pacific localtime B. cd /usr/localln Cs /usr/share/zoneinfo/US/Pacific zoneinfo C. cd /etc/localln Cs /usr/share/zoneinfo/US/Pacific localtime D. cd /usr/share/localln Cs /usr/share/zoneinfo/US/Pacific localectl Answer: A 30.A Linux administrator wants to fetch a Git repository from a remote Git server. Which of the following is the BEST command to perform this task? A. git checkout B. git clone C. git merge D. git config Answer: B Explanation: Reference: https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes 31.A technical support engineer receives a ticket from a user who is trying to create a 1KB file in the /tmp directory and is getting the following error No space left on device. The support engineer checks the /tmp directory, and it has 20GB of free space. Which of the following BEST describes a possible cause for this error? A. The /tmp directory is not mounted. B. The filesystem is formatted with a 4MB block size. C. the filesystem ran out of inodes. D. The /tmp directory has been set with an immutable attribute. Efficiently Pass XK0-004 Exam With CompTIA XK0-004 Exam Dumps [2022] Answer: C Explanation: Reference: https://www.maketecheasier.com/fix-linux-no-space-left-on-device-error/ 32.A systems administrator needs to install a new piece of hardware that requires a new driver. The driver should be manually installed. Which of the following describes the order of commands required to obtain module information, install the module, and check the log for any errors during module installation? A. lsmod, modprobe, modinfo B. modinfo, insmod, modprobe C. modinfo, insmod, dmesg D. lsmod, insmod, dmesg Answer: A 33.A systems administrator wants to know the current status of a series of dd jobs that were started in the background three hours ago. Which of the following commands will achieve this task? A. sudo killall CHUP dd B. sudo killall dd C. sudo killall CTERM dd D. sudo killall -USR1 dd Answer: D Explanation: Reference: https://askubuntu.com/questions/215505/how-do-you-monitor-the- progress-of-dd 34.A company wants to ensure that all newly created files can be modified only by their owners and that all new directory content can be changed only by the creator of the directory. Which of the following commands will help achieve this task? A. umask 0022 B. umask 0012 C. chmod CR 0644 / D. chmod CR 0755 / Answer: A Explanation: Reference: https://www.computerhope.com/unix/uumask.htm 35.A systems administrator is enabling quotas on the /home directory of a Linux server. The administrator makes the appropriate edits to the /etc/fstab file and attempts to issue the commands to enable quotas on the desired directory. However, the administrator receives an error message stating the filesystem does not support quotas. Which of the following commands should the administrator perform to proceed? A. mount Co remount /home B. quotacheck -cg C. edquota /home D. quotaon /home Answer: D Explanation: Reference: https://www.tecmint.com/set-filesystem-disk-quotas-on-ubuntu/ 36.A junior systems administrator is upgrading a package that was installed on a Red Hat-based system. The administrator is tasked with the following: Update and install the new package. Verify the new package version is installed. Which of the following should be done to BEST accomplish these task? (Choose two.) A. yum install <package name> B. yum upgrade C. rpm Ce <package name> D. rpm Cqa E. apt-get <package name> F. apt-get upgrade Answer: A,D Explanation: Reference: https://access.redhat.com/documentation/en- us/red_hat_enterprise_linux/6/html/deployment_guide/ch-yum Test XK0-004